<template>
	<view class="Recom_revenue">
		<image class="headerImg" :src="list.avatar | imgurl"></image>
		<view class="list">昵称:{{list.nickname}}</view>
		<view class="list">推荐收益:{{list.profit}}</view>
		<view class="list">联系电话:{{list.mobile}}</view>
		<view class="list">团队人数:{{list.team_num}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				list: []
			};
		},
		onLoad: function(option) {
			//获取路由传值
			this.id = option.id
			this.getData(this.id);
		},
		methods: {
			getData: function(id) {
				const _this = this;
				const data = {
					oid: id,
				};
				//我的抢单列表
				this.$request.get("/api/ucenter/getFundsDetail", {
						data: data
					})
					.then(res => {
						if (res.data.code == 1) {
							_this.list = res.data.data;
						}
					})
					.catch(error => {
						console.error('error:', error);
					});

			},
		},
		filters: {
			imgurl(value) {
				value = 'http://www.huanqiuyt.com' + value
				return value
			},
			numFilter2(value) {
				// 截取当前数据到小数点后两位
				let realVal = Number(value).toFixed(2)
				// num.toFixed(2)获取的是字符串
				return Number(realVal)
			}
		}
	}
</script>

<style lang="less">
	.Recom_revenue {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		border-top: 5px solid #F1F1F1;

		.headerImg {
			width: 200upx;
			height: 200upx;
			margin-top: 20px;
		}

		.list {
			line-height: 100upx;
			width: 70%;
			text-align: center;
			border-bottom: 1px solid #F1F1F1;
		}
	}
</style>
